<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>LavaJet</title>
</h:head>
<h:body>
	<h:form>
		<p:panel id="panel" header="Veiculo">
			<p:messages id="msgs" />
			<h:panelGrid columns="3" cellpadding="1">

				<h:outputLabel value="Marca:" style="font-weight:bold" />
				<p:inputText id="marca" value="#{cadastroBean.veiculo.marca}" />
				<h:outputLabel value="" />

				<h:outputLabel value="Modelo:" style="font-weight:bold" />
				<p:inputText id="modelo" value="#{cadastroBean.veiculo.modelo}" />
				<h:outputLabel value="" />

				<h:outputLabel value="Placa:" style="font-weight:bold" />
				<p:inputMask id="placa" value="#{cadastroBean.veiculo.placa}"
					mask="aaa-9999" required="true" label="Placa" />
				<p:message for="placa" id="msgPlaca" display="icon" />

				<h:outputLabel value="Cor:" style="font-weight:bold" />
				<p:inputText id="cor" value="#{cadastroBean.veiculo.cor}" />
				<h:outputLabel value="" />

				<p:commandButton id="btnCadastrar" value="Cadastrar" update="panel"
					action="#{cadastroBean.inserirVeiculo}" />

			</h:panelGrid>
		</p:panel>

	</h:form>
</h:body>
</html>